package com.glory.gloryquickui.entity

import android.content.Context
import android.graphics.drawable.Drawable
import java.io.Serializable
import com.glory.gloryquickui.R
import com.glory.gloryquickui.utils.Utils
import com.glory.gloryquickui.widget.tablayout.listener.CustomTabEntity

/**
 * FileName: HomeBean
 * Author: XJH
 * Date: 2021/5/27 15:26
 * Description:
 * History:
 */
data class HomeBean(
    var tabList : List<HomeTabBean> = arrayListOf()
) : Serializable {

    data class HomeTabBean(
        var fromID : String = "",
        var picSelectedName : String = "",
        var picUnSelectedName : String = "",
        var tabName: String = ""
    ) : Serializable,CustomTabEntity{
        var context : Context? = null

        override fun getTabTitle(): String {
            return tabName
        }

        override fun getTabSelectedIcon(): Drawable {
            return Utils.getPicToDrawable(context,picSelectedName)
        }

        override fun getTabUnselectedIcon(): Drawable {
            return Utils.getPicToDrawable(context,picUnSelectedName)
        }

    }
}